iT邦幫忙

2025 iThome 鐵人賽

DAY 6
2
Software Development

30 天的 .Net gRPC 迷途系列 第 6

Day6 使用 Postman 進行 gRPC 服務測試(1)

  • 分享至 

  • xImage
  •  

目前新版本的 Postman 已經支援 gRPC 的測試,下面就來簡介怎麼進行操作。

https://ithelp.ithome.com.tw/upload/images/20250827/20177884NZOJ1lhYfA.png

在匯入端點有兩種方式

  • 匯入 .proto
  • Server Seflection

我們來依序介紹怎麼操作這兩種方法

匯入 .proto 檔

  1. 切換到 Service definition,接著選擇 Server 專案裡的 .proto
    https://ithelp.ithome.com.tw/upload/images/20250827/20177884LXetf1pZim.png
  2. Select a method 的地方就會出現服務的名稱
    https://ithelp.ithome.com.tw/upload/images/20250827/20177884qgG71Q4uLW.png
  3. URL 的地方就輸入 Server 的 Host,針對不同的 https/http 要記得 Enable/Disable TLS,不然會無法正確的呼叫到服務。同時也要調整成 grpc:// 開頭
    https://ithelp.ithome.com.tw/upload/images/20250827/20177884vGhipjf66r.png

這邊介紹到這裡,明天繼續介紹 Server Seflection


上一篇
Day5 建立基本 gRPC Client 端
下一篇
Day7 使用 Postman 進行 gRPC 服務測試(2)
系列文
30 天的 .Net gRPC 迷途9
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言